package com.smartwebx.ha.biz.rainwater.real.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.google.common.collect.Maps;
import com.smartwebx.ha.biz.rainwater.real.ProductManager;
import com.smartwebx.ha.dal.realtime.prod.ProductMapper;
import com.smartwebx.ha.dal.usebean.StationValue;

@Service
public class ProductManagerImpl implements ProductManager {
	@Autowired
	private ProductMapper productDao;

	@SuppressWarnings("unchecked")
	@Override
	public List<StationValue> findStatVals(String startTm, String endTm) {
		Map<String, Object> map = Maps.newHashMap();
		map.put("startTm", startTm);
		map.put("endTm", endTm);
		productDao.findStatVals(map);
		List<StationValue> statVals = ((List<StationValue>) map.get("result"));
		return statVals;
	}

}
